import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as Icons from '@element-plus/icons-vue'
import { createPinia } from "../node_modules/pinia/dist/pinia";
import router from './router'
import  persist  from 'pinia-plugin-persist'
// import router from '../src/router/module/base-routes'
import zhCn from "element-plus/es/locale/lang/zh-cn";

const app = createApp(App)
app.use(ElementPlus, {
  locale: zhCn,
})
const pinia = createPinia();

pinia.use(persist)
app.use(pinia)
app.use(router)

for (const [key, component] of Object.entries(Icons)) {
  app.component(key, component)
}
// app.use(router)
app.mount('#app')
